<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Performance Detail</title>
        <link rel="stylesheet" type="text/css" href="/static/extjs/resources/css/ext-all.css" rel="stylesheet" />
        <link rel="stylesheet" type="text/css" href="/static/extjs/ux/treegrid/treegrid.css" rel="stylesheet" />
        <script type="text/javascript" src="/static/extjs/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="/static/extjs/ext-all.js"></script>
        
        <script type="text/javascript" src="/static/extjs/ux/treegrid/TreeGridSorter.js"></script>
        <script type="text/javascript" src="/static/extjs/ux/treegrid/TreeGridColumnResizer.js"></script>
        <script type="text/javascript" src="/static/extjs/ux/treegrid/TreeGridNodeUI.js"></script>
        <script type="text/javascript" src="/static/extjs/ux/treegrid/TreeGridLoader.js"></script>

        <script type="text/javascript" src="/static/extjs/ux/treegrid/TreeGridColumns.js"></script>
        <script type="text/javascript" src="/static/extjs/ux/treegrid/TreeGrid.js"></script>
        <script type="text/javascript" src="../js/help.js"></script>    
        
        <script type="text/javascript">
Ext.onReady(function() {
    Ext.QuickTips.init();

	var time = QueryString('time');
	var name = QueryString('name');
	var dataLoader = new Ext.ux.tree.TreeGridLoader({ clearOnLoad:true});
    dataLoader.dataUrl = '../performance/' + name + '/' + time;
    var tree = new Ext.ux.tree.TreeGrid({
		width:  '100%',
        height: 420,
        renderTo: Ext.getBody(),
        enableDD: true,

        columns:[{
            header: '名称',
            dataIndex: 'name',
            width: 400
        },{
            header: '总调用次数',
            dataIndex: 'totalInvokes',
            width: 120,
            align: 'right'
        },{
            header: '平均调用时间(ms/t)',
            dataIndex: 'avarage',
            width: 120,
            align: 'right'
        },{
            header: '占总调用比例',
            width: 120,
            align: 'right',
            dataIndex: 'percent',
            tpl: new Ext.XTemplate('{percent:this.formatPercent}', {
                formatPercent: function(v) {
                   return v  + '%';
                }
            })
        }],
		loader : dataLoader
    });
    dataLoader.load();
    
});
        </script>
    </head>

    <body style="padding: 10px;"></body>
</html>